from rest_framework.response import Response
from rest_framework.views import APIView

from six_it.serializerss.spit import SpitSerializer
from xyz.models import Spit


class SpitAPIView(APIView):

    def get(self, request, id):


        data = Spit.objects.filter(parent_id=id)

        serializer = SpitSerializer(data,many=True)

        return Response(serializer.data)